<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var a = prompt('用户名')
        var b = prompt('密码')
        while (a !== 'admin' && b !=='密码') {
            prompt('用户名')
            prompt('密码')
        }
        alert('登陆成功')
    </script>
</body>
</html>